import { createRouter, createWebHistory } from 'vue-router'
// import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/Main',
      name: 'Main',
      component: () => import('../views/MainView.vue'),
      children: [
        {
          path: '/Users/UserAdd',
          name: 'UserAdd',
          component: () => import('../views/Users/UserAddView.vue')
        },
        {
          path: '/Users/UserRoleList',
          name: 'UserRoleList',
          component: () => import('../views/Users/UserRoleListView.vue')
        },
        {
          path: '/Users/UserUpdata',
          name: 'UserUpdata',
          component: () => import('../views/Users/UserUpdataView.vue')
        },
        {
          path: '/Roles/RoleAdd',
          name: 'RoleAdd',
          component: () => import('../views/Roles/RoleAddView.vue')
        },
        {
          path: '/Roles/RoleList',
          name: 'RoleList',
          component: () => import('../views/Roles/RoleListView.vue')
        },
        {
          path: '/Roles/RoleUpdate',
          name: 'RoleUpdate',
          component: () => import('../views/Roles/RoleUpdateView.vue')
        },
        {
          path: '/Menus/MenuAdd',
          name: 'MenuAdd',
          component: () => import('../views/Menus/MenuAddView.vue')
        },
        {
          path: '/Menus/MenuList',
          name: 'MenuList',
          component: () => import('../views/Menus/MenuListView.vue')
        },
        {
          path: '/Menus/MenuUpdate',
          name: 'MenuUpdate',
          component: () => import('../views/Menus/MenuUpdateView.vue')
        },
        {
          path: '/RoleMenus/RoleMenuAdd',
          name: 'RoleMenuAdd',
          component: () => import('../views/RoleMenus/RoleMenuAddView.vue')
        },
        {
          path: '/Leaves/LeaveAdd',
          name: 'LeaveAdd',
          component: () => import('../views/Leaves/LeaveAddView.vue')
        },
        {
          path: '/Leaves/LeaveList',
          name: 'LeaveList',
          component: () => import('../views/Leaves/LeaveListView.vue')
        },
        {
          path: '/Leaves/LeaveUpdate',
          name: 'LeaveUpdate',
          component: () => import('../views/Leaves/LeaveUpdateView.vue')
        },
        {
          path: '/Leaves/LeaveApproval',
          name: 'LeaveApproval',
          component: () => import('../views/Leaves/LeaveApprovalView.vue')
        },
        {
          path: '/Traceabilities/TraceabilityList',
          name: 'TraceabilityList',
          component: () => import('../views/Traceabilities/TraceabilityListView.vue')
        },
        {
          path: '/Traceabilities/TraceabilityInfo',
          name: 'TraceabilityInfo',
          component: () => import('../views/Traceabilities/TraceabilityInfoView.vue')
        }
      ]
    },
    {
      path: '/Traceabilities/TraceabilityMobile',
      name: 'TraceabilityMobile',
      component: () => import('../views/Traceabilities/TraceabilityMobileView.vue')
    },
  ]
})

export default router
